package com.cloud.pole.shop.biz.goods;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Options;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ace.cache.annotation.Cache;
import com.ace.cache.annotation.CacheClear;
import com.cloud.pole.common.biz.BaseBiz;
import com.cloud.pole.shop.model.entity.goods.ShopGoods;
import com.cloud.pole.shop.model.entity.goods.ShopGoodsSpec;
import com.cloud.pole.shop.model.entity.goods.ShopGoodsValue;

import tk.mybatis.mapper.entity.Example;

import com.cloud.pole.mapper.goods.ShopGoodsValueMapper;

/**
 * ${DESCRIPTION}
 *
 * @author wanghaobin
 * @create 2017-06-08 16:23
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ShopGoodsValueBiz extends BaseBiz<ShopGoodsValueMapper, ShopGoodsValue> {
	
	@Autowired
	ShopGoodsValueMapper ShopGoodsValueMapper;
	
	@Cache(key="shopGoodsValue{1}")
    public ShopGoodsValue selectById(Integer id) {
		 return super.selectById(id);
    }
	
	@Cache(key="shopGoodsValueList{1}")
    public List<ShopGoodsValue> selectListByGoodsId(Integer goodsId) {
		 Example example = new Example(ShopGoodsValue.class);
         //example.setOrderByClause("order_level");
 	     example.createCriteria().andEqualTo("goodsId", goodsId);
		 return selectByExample(example);
    }
}
